package com.northpool.operator.bean;


import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.List;

@XmlRootElement(name = "param")
@XmlAccessorType(XmlAccessType.FIELD)
public class ParamBean implements Serializable {
    @XmlElement(name = "ref")
    String ref;
    @XmlElement(name = "name")
    String name;
    @XmlElement(name = "title")
    @Deprecated
    String title;
    @XmlElement(name = "description")
    String description;
    @XmlElement(name = "required")
    Boolean required;
    @XmlElement(name = "inout")
    String inout;
    @XmlElement(name = "type")
    String type;
    @XmlElement(name = "value")
    String value;
    @XmlElementWrapper(name = "enums")
    @XmlElement(name = "enum")
    List<ParamEnumBean> enums;

    public ParamBean() {
    }

    public ParamBean(String name, String value) {
        this.inout = "in";
        this.name = name;
        this.value = value;
    }

    public ParamBean(String name, String inout, String type, String value) {
        this.name = name;
        this.inout = inout;
        this.type = type;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public String getRef() {
        return ref;
    }

    public void setRef(String ref) {
        this.ref = ref;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Boolean getRequired() {
        return required;
    }

    public void setRequired(Boolean required) {
        this.required = required;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getInout() {
        return inout;
    }
    public void setInout(String inout) {
        this.inout = inout;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public List<ParamEnumBean> getEnums() {
        return enums;
    }

    public void setEnums(List<ParamEnumBean> enums) {
        this.enums = enums;
    }
}
